﻿#include "Manager.h"

typedef struct tagWall
{
	TBase base;
}TWall, *PTWall;


//碰撞检测实体
static int CollsionCB(void *pHero, void *pBase)
{
	printf("\033[15;15H发生碰撞");
	_getch();
	printf("\033[15;15H                ");
	return 0;
}

//文件存储
static void SaveCB(PTBase p, const FILE * const pFile)
{
	SaveBase(p, pFile);
	//fprintf(pFile, "\n");
}

//墙初始化实体
PTBase CreateInitWall(int x, int y, struct tagBroad* pBroad)
{
	PTWall p = malloc(sizeof(TWall));
	p->base.name = "墙";
	InitBase(&p->base, x, y, E_Wall, CollsionCB, SaveCB);
	return p;
}